import request from '@/utils/request';
import config from '@/env/config';

/**
 * 上传文件
 * @returns string
 */
export function upload(data): Promise<never> {
  return request({
    data,
    method: 'post',
    headers: {
      'content-type': 'multipart/form-data',
    },
    url: `${config.SERVICE_API}upload/file`,
  });
}
